using namespace std;
#include <MOOSLIB/MOOSApp.h>
#include "matrix.h"
typedef struct _state{
	double u;
	double v;
	double w;
	
	double p;
	double q;
	double r;
	
	double x;
	double y;
	double z;
	
	double phi;
	double theta;
	double psi;	
} state;

class CRov : public CMOOSApp
{
public:
    CRov();
    virtual ~CRov();
protected:
    bool OnNewMail(MOOSMSG_LIST &NewMail);
    bool Iterate();
    bool OnConnectToServer();
    bool OnStartUp();
    void DoRegistrations();
    bool OnPropulsion(CMOOSMsg& msg);
private:
	state _state;
	
	double _dblu0;
	double _dblv0;
	double _dblw0;
	double _dblp0;
	double _dblq0;
	double _dblr0;
	double _dblx0;
	double _dbly0;
	double _dblz0;
	double _dblphi0;
	double _dbltheta0;
	double _dblpsi0;
	double _dblIx;
	double _dblIy;
	double _dblIz;
	double _dblIxy;
	double _dblIyz;
	double _dblIxz;
	double _dblm;
	double _dblxG;
	double _dblyG;
	double _dblzG;
	double _dblxB;
	double _dblyB;
	double _dblzB;
	double _dblXu;
	double _dblYv;
	double _dblZw;
	double _dblKp;
	double _dblMq;
	double _dblNr;
	double _dblXuu;
	double _dblYvv;
	double _dblZww;
	double _dblKpp;
	double _dblMqq;
	double _dblNrr;
	double _dblXud;
	double _dblYvd;
	double _dblZwd;
	double _dblKpd;
	double _dblMqd;
	double _dblNrd;
	double _dblkL;
	double _dblkD;
	double _dblkY;
	double _dblkl;
	double _dblkm;
	double _dblkn;
	double _dblClp;
	double _dblClr;
	double _dblCmq;
	double _dblCma;
	double _dblrho;
	double _dblA;
	double _dbll;
	double _dblh;
	double _dblW;
	double _dblB;
	
};



